<template>
	<view style="background: #FFFFFF; min-height: 100vh;">
		<view class="search-header flex alcenter space pd30">
			<view class="search-box plr30 flex alcenter text-notice">
				<text class="iconfont icon_search"></text>
				<input type="text" v-model="keyword" class="ml20 ft16" placeholder="输入要搜索的内容" />
			</view>
			<view @click="search" class="ft16 text-theme search-btn">搜索</view>
		</view>
		<view class="pd30">
			<view class=" ft16 flex space alcenter">
				<view class="flex alcenter">
					<text class="iconfont icon_history text-placeholder ft18"></text>
					<text class="ml20 text-info">最近搜索</text>
				</view>
				<text class="iconfont iconbtn_delete  ft18 text-placeholder"></text>
			</view>
			
			<view class="flex wrap mt50">
				<view class="keyword-item">少儿培训</view>
				<view class="keyword-item">少儿</view>
				<view class="keyword-item">少儿培</view>
				<view class="keyword-item">少儿培训</view>
			</view>
			
			<view class="flex alcenter mt50 ft16">
				<text class="iconfont icon_hot1 text-placeholder ft18"></text>
				<text class="ml20 text-info">热门搜索</text>
			</view>
			
			<view class="flex wrap mt50">
				<view class="keyword-item">少儿培训</view>
				<view class="keyword-item">少儿培训搜索</view>
				<view class="keyword-item">少儿培训</view>
				<view class="keyword-item">少儿培训</view>
			</view>
		</view>
		
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				keyword:''
			}
		},
		onLoad(e){
			this.keyword = e.keyword;
		},
		methods: {
			search(){
				uni.redirectTo({
					url:'/pages/search/result?keyword='+encodeURI(this.keyword),
				})
			}
		}
	}
</script>

<style>

.keyword-item{
	background: #F5F6F7;
	padding: 20rpx 30rpx;
	font-size: 28rpx;
	border-radius: 4rpx;
	color:#333333;
	margin-right: 20rpx;
	margin-top: 20rpx;
}

.search-header{
	position: relative;
	height: 140rpx;
	z-index: 2;
}
.search-btn{
	width: 90rpx;
	text-align: center;
}
.search-box{
	width: calc(100% - 90rpx);
	height: 80rpx;
	background: #F5F5F5;
	border-radius: 40rpx;
}
</style>
